package com.carleasoft.mps.cms.business.train.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.carleasoft.mps.cms.business.train.bean.entity.*;
import com.carleasoft.mps.cms.business.train.bean.po.*;
import com.carleasoft.mps.cms.business.train.bean.vo.*;
import com.carleasoft.mps.core.result.R;
import com.carleasoft.mps.core.user.ThreadUserContext;
import com.carleasoft.mps.core.user.UserCacheData;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;

/**
 * <p>
 * 训练计划主题表 服务类
 * </p>
 *
 * @author fan
 * @since 2023-05-17
 */
public interface TrainPlanService extends IService<TrainPlan> {
    /**
     * 训练计划-增加
     */
    boolean add(TrainPlanAddOrEditPo trainPlanAddOrEditPo);
    /**
     * 训练计划-编辑
     */
    boolean edit(TrainPlanAddOrEditPo trainPlanAddOrEditPo);
    /**
     * 训练计划-删除
     */
    boolean delete(TrainPlan trainPlan);
    /**
     * 训练计划-分页查询
     */
    Page<TrainPlanVo> pageQuery(TrainPlanPageQueryPo trainPlanPageQueryPo);
    /**
     * 训练计划-分页查询(门户不需要token)
     */
    Page<TrainPlanVo> doorPageQuery(TrainPlanPageQueryPo trainPlanPageQueryPo);
    /**
     * 训练计划-详情
     */
    TrainPlanDetailVo detail(TrainPlan trainPlan);
    /**
     * 训练计划-填写
     */
    boolean FillIn(TrainPlanFillInPo trainPlanFillInPo);

    /**
     * 训练计划-填写-活动安排-模板数据解析
     */
    List<TrainPlanActivity> activityParse(MultipartFile file);
    /**
     * 训练计划-填写-活动安排-批量添加
     */
    boolean activityBatchAdd(List<TrainPlanActivity> trainPlanActivityList);

    /**
     * 训练计划-填写-教学安排-模板数据解析
     */
    List<TrainPlanTeach> teachParse(MultipartFile file);
    /**
     * 训练计划-填写-教学安排-批量添加
     */
    boolean teachBatchAdd(List<TrainPlanTeach> trainPlanTeachList);
    /**
     * 训练计划-填写-职业教育工作计划-模板数据解析
     */
    List<TrainPlanEducation> educationParse(MultipartFile file);
    /**
     * 训练计划-填写-职业教育工作计划-批量添加
     */
    boolean educationBatchAdd(List<TrainPlanEducation> trainPlanEducationList);
    /**
     * 训练计划-填写-阶段计划-模板数据解析
     */
    List<TrainPlanStage> stageParse(MultipartFile file);
    /**
     * 训练计划-填写-阶段计划-批量添加
     */
    boolean stageBatchAdd(List<TrainPlanStage> trainPlanStageList);
    /**
     * 训练计划-填写-其他（除年）-模板数据解析
     */
   List<TrainPlanItem> itemParse(MultipartFile file);

    /**
     * 训练计划-填写-其他（除年）-批量添加
     */
    boolean itemBatchAdd(List<TrainPlanItem> trainPlanStageList);
    /**
     * 训练计划-填写-模板下载
     */
    boolean stageDownload(TrainPlanFillInDownloadPo trainPlanFillInDownloadPo, HttpServletResponse response);
    /**
     *训练计划-查询各种计划（查六条）
     */
    TrainArchiveVo queryPlan();

    /**
     * 考核情况
     */
    AssessmentVo assessment(TrainAndCasePo trainAndCasePo);
    /**
     * 根据考核编码统计各分段占比
     */
    HashMap<String,Object> statisticsByExamCode(@RequestBody TrainAndCasePo trainAndCasePo);
    /**
     * 训练计划
     */
    List<HashMap<String,Object>> planStatistics(TrainAndCasePo trainAndCasePo);
    /**
     * 用车情况
     */
    List<HashMap<String,Object>> byCarStatistics( TrainAndCasePo trainAndCasePo);
    /**
     * 事件处理情况
     */
    CaseStatisticsVo caseStatistics( TrainAndCasePo trainAndCasePo);
    /**
     * 按月份统计
     */
    List<HashMap<String,Object>> statisticsByMonth(TrainAndCasePo trainAndCasePo);
    /**
     * 工作台-内容较审&训练档案待办
     */
    Page<HashMap<String,Object>> reviewAndTraining(ReviewAndTrainingPo reviewAndTrainingPo);
    /**
     * 统计分析-训练档案-训练计划统计
     */
    List<HashMap<String,Object>> trainingArchivesPlanStatistics();
    /**
     * 训练计划-列表（下拉选择使用
     */
    List<TrainPlanVo> trainPlanList();

    boolean planExcel(MultipartFile file);
}
